FROM openjdk:8-jre-slim

RUN echo "---------ruoyi-gateway.jar模块开始构建...----------"
ENV JAVA_OPTS=""
# spring可设置的应用参数
ENV APP_PARAMS=""
RUN rm -f /etc/localtime \
&& ln -sv /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone
COPY ./target/ruoyi-gateway.jar /ruoyi-gateway.jar
COPY src/main/resources/bootstrap.yml /config/

EXPOSE 10010

WORKDIR /

#ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS  -jar ruoyi-gateway.jar $APP_PARAMS"]
ENTRYPOINT [ "sh", "-c", "java -jar ruoyi-gateway.jar "]

RUN echo "---------ruoyi-gateway.jar模块构建完毕!!!----------"
